import React, { Component } from 'react';
import { Tag } from 'antd';

import 'styles/components/template/enhanceSelectEmployee/enhanceSelectEmployee.scss'
import {messages} from "share/common";

class LabelInputOnlyRead extends Component{

  toCall = () => {
    this.props.onClick();
  }

  render(){
    const { labels } = this.props;
    return (
      <div className='lable-input-only-read' onClick={this.toCall}>
        {
          labels.length > 0 ? labels.map(item => {
            return (
              <Tag key={item.value}>
                {item.label}
              </Tag>
            )
          }) : <span style={{color:'#bfbfbf'}}>{messages('common.select')/*"请选择"*/}</span>
        }
      </div>
    )
  }
}

LabelInputOnlyRead.defaultProps = {
  labels:[],
};

export default LabelInputOnlyRead;
